package com.dcy.znoa.domain.conference;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会议
 * @author chenjie
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class OperGuestVo {
	
    Long guestId;  //访问ID
	
	Long operId;  //被访者ID
	
    String operName;  //被访者姓名
		
	String phoneNo;  //被访者手机号
	
	String depName;  //被访者部门
	
    String gName;  //访客姓名
	
    Integer credentialType;

    String credentialNo;
	
    String phone; //访客电话
	
    String compName;   //访客公司
	
    Integer personNo; //访客人数
	
	String carNo;   //访客车牌号：多个就用逗号分隔
	
	String comment;  //备注
	
    Long compId;
	
    Integer auditStatus;    //0 TO_AUDIT  1审批通过   2拒绝
	
	String auditComment;
		
    String qrCode;
    
    Date guestTime;
	
    Long createOperId;
	
    String createOperName;

    Date createTime;

    Integer validFlag;

    String status;  //访客状态  "全部 ""被取消""TO_AUDIT""待会见""被拒绝""已会见"
    
    public static Map<String, Object> toMap(OperGuestVo operGuestVo) {
		Map<String, Object> map  = new HashMap<String, Object>();
		map.put("depName",operGuestVo.getDepName());
		map.put("operName",operGuestVo.getOperName());
		map.put("phoneNo",operGuestVo.getPhone());
		map.put("gName",operGuestVo.getGName());
		map.put("phone",operGuestVo.getPhone());
		map.put("credentialNo",operGuestVo.getCredentialNo());
		map.put("guestTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operGuestVo.getGuestTime()));
		map.put("compName",operGuestVo.getCompName());		
		map.put("personNo",operGuestVo.getPersonNo());
		map.put("carNo",operGuestVo.getCarNo());
		map.put("status",operGuestVo.getStatus());
		map.put("createOperName",operGuestVo.getCreateOperName());
		map.put("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operGuestVo.getCreateTime()));
		map.put("comment",operGuestVo.getComment());
	
        return  map;
	}
}